// ObjectImpl.java
// Mac Radigan
// $Id: ObjectImpl.groovy 40 2011-10-23 09:01:42Z mac.radigan $
package org.radigan.xom.impl

import org.radigan.xom.service.Object

import java.net.URI

public class ObjectImpl implements org.radigan.xom.service.Object {
  private URI namespace
  private String type
  private String name
  private Object value
  public Object(URI namespace, String type, String name, Object value) {
  }
  public void setValue(java.lang.Object value) {
    this.value = value
  }
  public java.lang.Object getValue() {
    return value
  }
  public String getStringValue() {
    return null
  }
  public String getIntegerValue() {
    return null
  }
  public String getDoubleValue() {
    return null
  }
  public org.radigan.xom.service.Object getObjectValue() {
    return null
  }
  public void setNamespace(URI namespace) {
  }
  public URI getNamespace() {
    return null
  }
  public void setName(String name) {
    this.name = name
  }
  public String getName() {
    return name
  }
  public void setType(String type) {
    this.type = type
  }
  public String getType() {
    return type
  }
  String toString() {
    def sb = new StringBuffer()
    sb << " [${getClass().getName()}]" << "\n"
    metaClass.fields.each { field ->
      sb << "  [${field.getClass().getName()}]" << "\n"
    }
    return sb.toString()
  }
  String toString(int indentLevel) {
    def sb = new StringBuffer()
    sb << """ """.multiply(indentLevel) << " [${getClass().getName()}]" << "\n"
    metaClass.fields.each { field ->
      sb << """ """.multiply(indentLevel) << field.toString(indentLevel+2)
    }
    return sb.toString()
  }
}

// *EOF*
